namespace Er
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    using Microsoft.Practices.Composite.Modularity;
    using Microsoft.Practices.Unity;

    using Shared.ViewModels;

    public class VocabularyManagerViewModelModule : IModule
    {
        private readonly IUnityContainer _container;

        public VocabularyManagerViewModelModule(IUnityContainer container)
        {
            _container = container;
        }

        public void Initialize()
        {
            _container.RegisterType<IWordEditorViewModel, WordEditorViewModel>(new ContainerControlledLifetimeManager());
            _container.RegisterType<IWordViewModelRepository, WordViewModelRepository>(new ContainerControlledLifetimeManager());
            _container.RegisterType<IWordViewModelFactory, WordViewModelFactory>(new ContainerControlledLifetimeManager());
        }
    }
}